<ul id="asideBar">
<li ng-show="title"> <a href="javascript:void(0)" ng-click="asideBar()" title="AsideTree"><i class="fa fa-bars"></i></a> </li>
<li> <a href="javascript:void(0)" ng-click="hideMdToggle()" title="hideShow"><i class="fa fa-chevron-{{hideMdIcon}}"></i></a> </li>
<li ng-show="backurl"> <a href="{{backurl}}" title="Back"> <i class="fa fa-file-text-o"></i></a></li>
<li> <a href="javascript:void(0)" title="save" ng-click="save()"><i class="fa fa-save"></i></a> </li>
</ul>
<!-- codemirror -->
<script src="js/codemirror/lib/codemirror.min.js"></script>
<script src="js/codemirror/addon/mode/overlay.js"></script>
<script src="js/codemirror/addon/selection/active-line.js"></script>
<script src="js/codemirror/mode/xml/xml.js"></script>
<script src="js/codemirror/mode/markdown/markdown.js"></script>
<script src="js/codemirror/mode/gfm/gfm.js"></script>
<script src="js/codemirror/mode/javascript/javascript.js"></script>
<script src="js/codemirror/mode/css/css.js"></script>
<script src="js/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<script src="js/codemirror/mode/clike/clike.js"></script>
<link rel="stylesheet" href="js/codemirror/lib/codemirror.css">

<style>
.CodeMirror{
	height: 100%;
	min-height: 300px;
	font-size: 14px;
	line-height: 16px;
	border:1px solid #ccc;
}
.CodeMirror-scroll {
	height: 100%;
	min-height: 300px;
}
.CodeMirror-linenumber {
    background-color: #fff;
}
.markdown{
	line-height: 16px;
}
</style>

<form ng-submit="save()" role="form" name="createOne">
<!-- 
	<div class="input-group">
		<input class="form-control" name="title" type="text" ng-model="md.mdpath" required ng-pattern=/^[a-zA-Z0-9\.\-\_\/]+.md$/ ng-trim="true">
		<span class="input-group-btn">
			<button type="submit" class="btn btn-default"> SAVE </button>
		</span>
	</div>
-->

	<p>
		<div ng-show="createOne.title.$error.required" class="alert alert-danger" role="alert"> 输入标题 </div>
		<div ng-show="createOne.title.$error.pattern" class="alert alert-danger" role="alert"> 输入正确的格式 </div>
	</p>

	<div id="md" >
		<ui-codemirror ui-codemirror-opts="editorOptions"  ng-model="md.mdc"  ui-refresh='mdRfresh'></ui-codemirror>
	</div>

	<div class="{{mdClass}}" ng-hide="hideMd" ng-if="mdHtml" ng-bind-html="mdHtml"></div>

	<p>
		<div ng-show="!md.mdc" class="alert alert-danger" role="alert"> 没有内容输入！ </div>
	</p>
</form>

<p>
	<div ng-show="saveStatus" class="alert alert-success" role="alert"> 保存成功 ！</div>
</p>

<style>
 .my-form {
   -webkit-transition:all linear 0.5s;
   transition:all linear 0.5s;
   background: transparent;
 }
 .my-form.ng-invalid {
   background: red;
 }
</style>




<!-- <div class="{{mdClass}}" id="md" ng-hide="hideMd" ng-if="md" marked="md"></div> -->
